package com.gxa.web_admin.controller.accesscontroller;

import com.gxa.common.R;
import com.gxa.modules.pojo.AlarmRules;
import com.gxa.modules.pojo.PushMode;
import com.gxa.modules.pojo.RoleType;
import com.gxa.modules.service.accessservice.SelectService;
import com.gxa.modules.service.accessservice.impl.SelectServiceImpl;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

@RestController
@RequestMapping(value = "select")
@Api(value = "查询模块",tags = "查询API")
public class SelectController {

    @Autowired
    private SelectService selectService;

    /**
     * 查询所有推送方式
     * @return 返回所有推送方式
     */
    @RequestMapping(value = "selectPushMode",method = RequestMethod.GET)
    @ApiOperation(value = "查询所有推送方式接口",notes = "查询推送方式",httpMethod = "GET", response = String.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    public R selectPushMode(){

        return selectService.selectPushMode();
    }

    /**
     * 查询所有告警类型
     * @return 返回所有告警类型
     */
    @RequestMapping(value = "selectAlarmType",method = RequestMethod.GET)
    @ApiOperation(value = "查询所有告警类型接口",notes = "查询告警类型",httpMethod = "GET", response = String.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    public R selectAlarmType(){

        return selectService.selectAlarmType();
    }

        /**
         * 查询所有角色类型
         * @return 返回所有角色类型
         */
        @RequestMapping(value = "selectRoleType",method = RequestMethod.GET)
        @ApiOperation(value = "查询所有角色类型接口",notes = "查询角色类型",httpMethod = "GET", response = String.class)
        @ApiResponses({
                @ApiResponse(code=200,message="请求成功"),
                @ApiResponse(code=404,message="找不到页面"),
                @ApiResponse(code=500,message="后台服务错误")
        })
        public R selectRoleType(){

            return selectService.selectRoleType();
        }

    /**
     * 查询所有项目状态
     * @return 返回所有项目状态
     */
    @RequestMapping(value = "selectProjectStatus",method = RequestMethod.GET)
    @ApiOperation(value = "查询所有项目状态接口",notes = "查询项目状态",httpMethod = "GET", response = String.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    public R selectProjectStatus(){

        return selectService.selectProjectStatus();
    }

    /**
     * 查询所有项目类型态
     * @return 返回所有项目类型
     */
    @RequestMapping(value = "selectProjectType",method = RequestMethod.GET)
    @ApiOperation(value = "查询所有项目类型态接口",notes = "查询项目类型",httpMethod = "GET", response = String.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    public R selectProjectType(){
        return selectService.selectProjectType();
    }

}
